home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / emula / arosdv19.lha / AROS / alib / newobject.c < prev    next >
C/C++ Source or Header  |  1996-10-24  |  2KB  |  87 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: newobject.c,v 1.2 1996/09/17 18:05:45 digulla Exp $
  4.     $Log: newobject.c,v $
  5.     Revision 1.2  1996/09/17 18:05:45  digulla
  6.     Same names for same parameters
  7.  
  8.     Revision 1.1  1996/08/28 17:52:29  digulla
  9.     First step to implement amiga.lib
  10.     BOOPSI Utility functions
  11.  
  12.  
  13.     Desc:
  14.     Lang: english
  15. */
  16. #include <intuition/classes.h>
  17. #include <intuition/intuitionbase.h>
  18. #include <stdarg.h>
  19.  
  20. extern struct IntuitionBase * IntuitionBase;
  21.  
  22. /*****************************************************************************
  23.  
  24.     NAME */
  25.     #include <intuition/classusr.h>
  26.     #include <clib/intuition_protos.h>
  27.  
  28.     APTR NewObject (
  29.  
  30. /*  SYNOPSIS */
  31.     struct IClass * classPtr,
  32.     UBYTE          * classID,
  33.     ULONG        tag1,
  34.     ...        )
  35.  
  36. /*  FUNCTION
  37.     Use this function to create BOOPSI objects (BOOPSI stands for
  38.     "Basic Object Oriented Programming System for Intuition).
  39.  
  40.     You may specify a class either by it's name (if it's a public class)
  41.     or by a pointer to its definition (if it's a private class). If
  42.     classPtr is NULL, classID is used.
  43.  
  44.     INPUTS
  45.     classPtr - Pointer to a private class (or a public class if you
  46.         happen to have a pointer to it)
  47.     classID - Name of a public class
  48.     tagList - Initial attributes. Read the documentation of the class
  49.         carefully to find out which attributes must be specified
  50.         here and which can.
  51.  
  52.     RESULT
  53.     A BOOPSI object which can be manipulated with general functions and
  54.     which must be disposed with DisposeObject() later.
  55.  
  56.     NOTES
  57.     This functions send OM_NEW to the dispatcher of the class.
  58.  
  59.     EXAMPLE
  60.  
  61.     BUGS
  62.  
  63.     SEE ALSO
  64.     DisposeObject(), SetAttrs(), GetAttr(), MakeClass(),
  65.     "Basic Object-Oriented Programming System for Intuition" and
  66.     "boopsi Class Reference" Dokument.
  67.  
  68.     INTERNALS
  69.  
  70.     HISTORY
  71.     29-10-95    digulla automatically created from
  72.                 intuition_lib.fd and clib/intuition_protos.h
  73.  
  74. *****************************************************************************/
  75. {
  76.     va_list args;
  77.     APTR    object;
  78.  
  79.     va_start (args, tag1);
  80.  
  81.     object = NewObjectA (classPtr, classID, (struct TagItem *)&tag1);
  82.  
  83.     va_end (args);
  84.  
  85.     return object;
  86. } /* NewObject */
  87.